//
//  BLCommon_Cell_Sheet.m
//  BLNew
//
//  Created by 乔小乔 on 2019/10/23.
//  Copyright © 2019 chehang168. All rights reserved.
//

#import "BLCommon_Cell_Sheet.h"
#import "BLSheetModel.h"
@implementation BLCommon_Cell_Sheet

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)reloadWithDic:(BLCommon_Model_AlertItem *)dic{
    //1:文字靠左灰、小，2：文字居中灰、小，3文字居中灰、大，4文字居中黑，5图文靠左，6图文居中
    self.viewLeft.hidden = YES;
    self.viewCenter.hidden = YES;
    self.labelTextCommom.hidden = YES;
    self.separatorInset = UIEdgeInsetsMake(0,16, 0, 16);
    switch (dic.type.integerValue) {
        case 1:
        {
            self.labelTextCommom.hidden = NO;
            self.labelTextCommom.font = [UIFont systemFontOfSize:14];
            self.labelTextCommom.textColor = [UIColor chColorWithHexString:@"#8D8E99"];
            self.labelTextCommom.textAlignment = NSTextAlignmentLeft;
            self.labelTextCommom.text = dic.text;
            self.separatorInset = UIEdgeInsetsMake(0, 500, 0, 0);
        }
            break;
        case 2:
        {
            self.labelTextCommom.hidden = NO;
            self.labelTextCommom.font = [UIFont systemFontOfSize:14];
            self.labelTextCommom.textColor = [UIColor chColorWithHexString:@"#8D8E99"];
            self.labelTextCommom.textAlignment = NSTextAlignmentCenter;
            self.labelTextCommom.text = dic.text;
            self.separatorInset = UIEdgeInsetsMake(0, 500, 0, 0);
        }
            break;case 3:
        {
            self.labelTextCommom.hidden = NO;
            self.labelTextCommom.font = [UIFont systemFontOfSize:16];
            self.labelTextCommom.textColor = [UIColor chColorWithHexString:@"#8D8E99"];
            self.labelTextCommom.textAlignment = NSTextAlignmentCenter;
            self.labelTextCommom.text = dic.text;
        }
            break;
        case 4:
        {
            self.labelTextCommom.hidden = NO;
            self.labelTextCommom.font = [UIFont systemFontOfSize:16];
            self.labelTextCommom.textColor = [UIColor chColorWithHexString:@"#1B1C33"];
            self.labelTextCommom.textAlignment = NSTextAlignmentCenter;
            self.labelTextCommom.text = dic.text;
        }
            break;
        case 5:
        {
            self.viewLeft.hidden = NO;
            self.labelText.text = dic.text;
            self.imgIcon.image = [UIImage imageNamed:dic.imgUrl];
        }
            break;
        case 6:
        {
            self.viewCenter.hidden = NO;
            self.labelTextCenter.text = dic.text;
            self.imgIconCenter.image = [UIImage imageNamed:dic.imgUrl];
        }
            break;
        default:
        {
            self.labelTextCommom.hidden = NO;
            self.labelTextCommom.font = [UIFont systemFontOfSize:16];
            self.labelTextCommom.textColor = [UIColor chColorWithHexString:@"#1B1C33"];
            self.labelTextCommom.textAlignment = NSTextAlignmentCenter;
            self.labelTextCommom.text = dic.text;
        }
            break;
    }
}
@end
